<h1>Liste des incidents</h1>

<fieldset>
	<legend> Liste des incidents </legend>
	<table class="main_table_incident">
		<tr>
			<td class="10p"></td>
			<td class="10p"></td>
			<td class="10p"></td>
			<td class="20p"></td>
			<td class="10p"></td>
			<td class="10p"></td>
			<td colspan="3"><%= link_to 'Ajouter un incident', new_incident_path %></td>
		</tr>
		<tr>
			<th colspan="2">Nom de la machine</th>
			<th>Type d'incident</th>
			<th>Info compl&eacute;mentaire</th>
			<th>Date de detection</th>
			<th>Date de resolution</th>
		</tr>

		<% @incidents.each do |incident| %>
		<tr>
			<td class="urgent box_machine_incident"></td>
			<td class="designation_incident"><%=h incident.machine.nom_machine %></td>
			<td><%=h incident.type_incident.designation %></td>
			<td><%=h incident.info_complementaire %></td>
			<td><%=h incident.date_detection %></td>
			<td><%=h (incident.date_resolution)? incident.date_resolution : "En cours de resolution" %></td>
			<td><%= link_to 'Afficher', incident %></td>
			<td><%= link_to 'Modifier', edit_incident_path(incident) %></td>
			<td><%= link_to 'Supprimer', incident, :confirm => 'Etes-vous sur?', :method => :delete %></td>
		</tr>
		<% end %>
	</table>
	</fieldset>
<br />

